Skip to content

test: raise utility coverage to 100%#12

Open
MFei8ht wants to merge 2 commits into
eliottreich:mainfrom
MFei8ht:codex/taskbounty-coverage-uplift
Open

test: raise utility coverage to 100%#12
MFei8ht wants to merge 2 commits into
eliottreich:mainfrom
MFei8ht:codex/taskbounty-coverage-uplift

Conversation

@MFei8ht

@MFei8ht MFei8ht commented May 31, 2026

Copy link
Copy Markdown

Summary

Adds focused Vitest coverage for the tiny utility modules used by the TaskBounty coverage uplift task:

  • array helpers: chunking, dedupe, and grouping
  • date helpers: day distance, weekend detection, day addition, and UTC day normalization
  • money helpers: formatting, platform fees, net payout, and even splits
  • string helpers: slugifying edge cases, truncation, title casing, and HTML escaping

TaskBounty task: https://www.task-bounty.com/task/coverage-uplift-starter-eliottreich-taskbounty-dog-4ug8k7

Verification

  • npm test - 23 tests passed
  • npx vitest run --coverage --coverage.reporter=text-summary --coverage.include=src/**/*.ts --coverage.exclude=src/**/*.test.ts - 100% statements / 96.96% branches / 100% functions / 100% lines

Copilot AI review requested due to automatic review settings May 31, 2026 15:03
@MFei8ht

MFei8ht commented May 31, 2026

Copy link
Copy Markdown
Author

TaskBounty traceability note:

This PR targets the current public feed item [$5] Coverage Uplift Starter - eliottreich/taskbounty-dogfood-tiny-utils.

Local verification:

  • npm test: 23 tests passing
  • direct coverage run: 100% statements, 96.96% branches, 100% functions, 100% lines

I also tried the TaskBounty submissions API with task id 37703bba-8af5-4068-b438-fad88c87ae40, but unauthenticated submission returns 401, so I'm leaving the task link and verification here for review.

@MFei8ht

MFei8ht commented Jun 1, 2026

Copy link
Copy Markdown
Author

Small follow-up pushed in 195c906:

  • changed npm run test:coverage to use JSON-escaped double quotes instead of single quotes, so the repository script reports coverage correctly on Windows too.

Re-verified locally:

  • npm test: 23 tests passing
  • npm run test:coverage: 100% statements, 96.96% branches, 100% functions, 100% lines

@MFei8ht

MFei8ht commented Jun 1, 2026

Copy link
Copy Markdown
Author

Quick TaskBounty submission-path note: the public feed still lists this $5 Coverage Uplift task with id 37703bba-8af5-4068-b438-fad88c87ae40, but the task URL is currently returning 404 for me.

The PR is still ready from my side. Verification remains:

  • npm test: 23 tests passing
  • npm run test:coverage: 100% statements, 96.96% branches, 100% functions, 100% lines

If there is a preferred TaskBounty claim/submission path for this PR, I can follow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant